package 左叶子之和;

public class Test2 {
    public static void main(String[] args) {
        Solution2 solution = new Solution2();

        // Construct the test case
        TreeNode root = new TreeNode(3);
        root.left = new TreeNode(9);
        root.right = new TreeNode(20);
        root.right.left = new TreeNode(15);
        root.right.right = new TreeNode(7);

        // Expected result
        int expected = 24; // 9 + 15

        // Call the method and assert the result
        int result = solution.sumOfLeftLeaves(root);
        System.out.println("result = " + result);
    }
}

